buildNumber=`cat package.json | grep buildNumber | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]'`
version=`cat package.json | grep version | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]'`

newNumber=$buildNumber
((newNumber++))
sed -i -e s/$buildNumber/$newNumber/g  package.json

tag=$buildNumber
ver=$version
build=$ver"-"$tag
echo ${build}

scp -r src/* root@192.168.2.1:/home/code/zhiyuan-api/src
scp -r package.json root@192.168.2.1:/home/code/zhiyuan-api/package.json
scp -r public root@192.168.2.1:/home/code/zhiyuan-api/
scp -r typings root@192.168.2.1:/home/code/zhiyuan-api/
# scp -r test root@192.168.2.1:/home/code/zhiyuan-api/test
# scp -r view root@192.168.2.1:/home/code/zhiyuan-api/view
scp -r bootstrap.js tsconfig.json root@192.168.2.1:/home/code/zhiyuan-api
scp -r .editorconfig root@192.168.2.1:/home/code/zhiyuan-api
scp -r .prettierrc.js root@192.168.2.1:/home/code/zhiyuan-api
scp -r docker-compose.yml root@192.168.2.1:/home/code/zhiyuan-api
scp -r jest.config.js root@192.168.2.1:/home/code/zhiyuan-api
scp -r tsconfig.json root@192.168.2.1:/home/code/zhiyuan-api
git add . 
git commit -m "feat: release-"$build
git push